Skip to content

Conversation

@avi-alpert
Copy link
Contributor

@avi-alpert avi-alpert commented May 9, 2025

Problem

  • There is no telemetry for # and length of @Code added to messages by users
  • There is no telemetry to measure metrics for chat history and export features:
    • Number of tabs automatically restored from history
    • Number of users exporting chat transcripts, with which format (markdown vs html)
    • Number of users who are opening chat history list (will use existing ui_click metric, no changes needed in this PR)
    • Number of users who are searching, exporting, deleting, and opening conversations from history
    • How long it takes to complete history searches
    • History file sizes, time to load history files into memory

Solution

Add the following metrics:

  • amazonq_exportTab
  • amazonq_loadHistory
  • amazonq_performChatHistoryAction

To measure code symbol use, add the following types to amazonq_addMessage metric:

  • cwsprChatCodeContextCount
  • cwsprChatCodeContextLength
  • cwsprChatCodeContextTruncatedLength

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@avi-alpert avi-alpert requested a review from a team as a code owner May 9, 2025 15:05
@avi-alpert avi-alpert force-pushed the aalpert/history-metrics branch from fe64bb8 to b3fa82f Compare May 9, 2025 15:28
{
"name": "exportFormat",
"type": "string",
"allowedValues": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can reuse filenameExt

{
"name": "filenameExt",
"type": "string",
"description": "Filename extension (examples: .txt, .yml, .yaml, .asl.yaml, ...), or empty string if the filename does not contain dot (.) between two chars."
},

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

"export",
"open",
"delete"
],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have action that can be reused here unless we have strong reason for prefix:

{
"name": "action",
"type": "string",
"description": "Name of an action that was taken, displayed, etc. See also `userChoice`."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no thats fine, i can switch it to the existing action type

@avi-alpert
Copy link
Contributor Author

Ready to merge, ty

@justinmk3 justinmk3 merged commit 4c7fcfb into aws:main May 9, 2025
5 checks passed
@avi-alpert avi-alpert deleted the aalpert/history-metrics branch May 9, 2025 22:23
justinmk3 pushed a commit to aws/aws-toolkit-vscode that referenced this pull request May 12, 2025
## Problem
New telemetry metrics were
[added](aws/aws-toolkit-common#1023) to
aws-toolkit-common

## Solution
Consume latest version of aws-toolkit-common package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants